package com.training.java.core.tdd;

import junit.framework.TestCase;

import org.junit.Test;


public class CalculatorTest {
	
@Test
	public void adding2And3ShouldGiveMe5(){
		
		Calculator calc = new Calculator();
		int result = (int) calc.add(2, 3);
		TestCase.assertEquals(5, result);
	}

@Test	
	public void adding5And8ShouldGiveMe13(){
		
		Calculator calc = new Calculator();
		int result = (int)calc.add(5, 8);
		TestCase.assertEquals(13, result);
	}

@Test
	public void testAddForDecimalNumbers(){
	
	Calculator calc = new Calculator();
	double result = calc.add(5.5, 3.2);
	TestCase.assertEquals(8.7, result);
	
}
}
